package com.yxhl.zoume.data.http.rest.param.tripsmgnt;

import com.yxhl.zoume.data.http.rest.param.base.BaseRequestParam;

/**
 * Created by sugarya on 16/3/27.
 */
public class HistoryTripsParam extends BaseRequestParam {

    private static final int HISTORY_TRIP_TYPE = 2;

    private int type = HISTORY_TRIP_TYPE;
    private PageInfo page;


    public HistoryTripsParam(String mobile, String token, PageInfo page) {
        super(mobile, token);
        this.page = page;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public PageInfo getPage() {
        return page;
    }

    public void setPage(PageInfo page) {
        this.page = page;
    }

    @Override
    public String toString() {
        return "HomeTripsParam{" +
                "type=" + type +
                ", page=" + page +
                '}';
    }

    public static class PageInfo {

        private int currentPage;
        private int pageSize;

        public PageInfo(int currentPage, int pageSize) {
            this.currentPage = currentPage;
            this.pageSize = pageSize;
        }

        public int getCurrentPage() {
            return currentPage;
        }

        public PageInfo setCurrentPage(int currentPage) {
            this.currentPage = currentPage;
            return this;
        }

        public int getPageSize() {
            return pageSize;
        }

        public PageInfo setPageSize(int pageSize) {
            this.pageSize = pageSize;
            return this;
        }

        @Override
        public String toString() {
            return "PageInfo{" +
                    "currentPage=" + currentPage +
                    ", pageSize=" + pageSize +
                    '}';
        }
    }
}
